home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Development Kits / MPW etc. / MPW-GM / Interfaces&Libraries / Interfaces / PInterfaces / Retrace.p < prev    next >
Encoding:
Text File  |  1998-02-17  |  2.8 KB  |  117 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Retrace.p
  3.  
  4.      Contains:    Vertical Retrace Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Retrace;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __RETRACE__}
  28. {$SETC __RETRACE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC RetraceIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40.  
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46.  
  47. TYPE
  48.     VBLTaskPtr = ^VBLTask;
  49. {$IFC TYPED_FUNCTION_POINTERS}
  50.     VBLProcPtr = PROCEDURE(vblTaskPtr: VBLTaskPtr);
  51. {$ELSEC}
  52.     VBLProcPtr = Register68kProcPtr;
  53. {$ENDC}
  54.  
  55.     VBLUPP = UniversalProcPtr;
  56.     VBLTask = RECORD
  57.         qLink:                    QElemPtr;
  58.         qType:                    INTEGER;
  59.         vblAddr:                VBLUPP;
  60.         vblCount:                INTEGER;
  61.         vblPhase:                INTEGER;
  62.     END;
  63.  
  64.  
  65. CONST
  66.     uppVBLProcInfo = $00009802;
  67.  
  68. FUNCTION NewVBLProc(userRoutine: VBLProcPtr): VBLUPP;
  69.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  70.     INLINE $2E9F;
  71.     {$ENDC}
  72.  
  73. PROCEDURE CallVBLProc(vblTaskPtr: VBLTaskPtr; userRoutine: VBLUPP);
  74.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  75.     {To be implemented:  Glue to move parameters into registers.}
  76.     {$ENDC}
  77. FUNCTION GetVBLQHdr: QHdrPtr;
  78.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  79.     INLINE $2EBC, $0000, $0160;
  80.     {$ENDC}
  81. FUNCTION SlotVInstall(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  82.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  83.     INLINE $301F, $205F, $A06F, $3E80;
  84.     {$ENDC}
  85. FUNCTION SlotVRemove(vblBlockPtr: QElemPtr; theSlot: INTEGER): OSErr;
  86.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  87.     INLINE $301F, $205F, $A070, $3E80;
  88.     {$ENDC}
  89. FUNCTION AttachVBL(theSlot: INTEGER): OSErr;
  90.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  91.     INLINE $301F, $A071, $3E80;
  92.     {$ENDC}
  93. FUNCTION DoVBLTask(theSlot: INTEGER): OSErr;
  94.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  95.     INLINE $301F, $A072, $3E80;
  96.     {$ENDC}
  97. FUNCTION VInstall(vblTaskPtr: QElemPtr): OSErr;
  98.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  99.     INLINE $205F, $A033, $3E80;
  100.     {$ENDC}
  101. FUNCTION VRemove(vblTaskPtr: QElemPtr): OSErr;
  102.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  103.     INLINE $205F, $A034, $3E80;
  104.     {$ENDC}
  105.  
  106.  
  107. {$ALIGN RESET}
  108. {$POP}
  109.  
  110. {$SETC UsingIncludes := RetraceIncludes}
  111.  
  112. {$ENDC} {__RETRACE__}
  113.  
  114. {$IFC NOT UsingIncludes}
  115.  END.
  116. {$ENDC}
  117.